{% load staticfiles %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!--引入bootstrap的css文件 -->
    <link rel="stylesheet" href="../static/bootstrap/css/bootstrap.min.css">
    <!--引入vue.js -->
    <script type="text/javascript" src="../static/vue/vue-2.5.16.js"></script>
    <script type="text/javascript" src="../static/vue/axios-0.18.0.min.js"></script>
    <!-- Footer部分 -->
    <script type="text/javascript" src="../static/js/host.js"></script>
    <script type="text/javascript" src="../static/js/common.js"></script>
    <script type="text/javascript" src="../static/js/center.js"></script>
    <title>Title</title>
</head>
<body background="../static/img/img_3.png" >
<a class="navbar-brand" href="/">
                    <img src="{% static 'img/img.png' %}" width="144" height="72" alt="">
                </a>

<form class="col-md-6 offset-md-3" method="post" enctype="multipart/form-data">
    {% csrf_token %}
    <div class="form-group">
        <label for="username">用户名</label>
        <input type="text" class="form-control" id="username" name="username" value="{{ username }}">
    </div>
    <!--<br><h5 class="col-md-4">暂无头像</h5><br>-->
    <br>
    {% if avatar %}
        <img src="{{ avatar }}"
             style="max-width: 20%;" class="img-thumbnail"><br>
        {% else %}
            <img src="{% static '/img/portrait.png' %}"
                style="max-width: 20%;" class="img-thumbnail"><br>
    {% endif %}
    <div class="form-group">
        <label for="avatar">上传图像</label>
        <input type="file" class="form-control-file" name="avatar" id="avatar">
    </div>
    <div class="form-group">
        <label for="phone">电话</label>
        <input type="text" class="form-control" disabled="disabled" id="phone" name="phone" value="{{ mobile }}">
    </div>
    <div class="form-group">
        <label for="desc">简介</label>
        <textarea type="text" class="form-control" id="desc" name="desc" rows="5">{{ user_desc }}</textarea>
        <button type="submit" class="btn btn-primary" style="margin-left: 12px">修改</button>
    </div>
</form>
</body>
</html>